home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pine / imap-3.0 / non-ANSI / c-client / tenex2.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-25  |  4.0 KB  |  140 lines

  1. /*
  2.  * Program:    Tenex mail routines
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  * Date:    22 May 1990
  13.  * Last Edited:    25 April 1993
  14.  *
  15.  * Copyright 1993 by the University of Washington
  16.  *
  17.  *  Permission to use, copy, modify, and distribute this software and its
  18.  * documentation for any purpose and without fee is hereby granted, provided
  19.  * that the above copyright notice appears in all copies and that both the
  20.  * above copyright notice and this permission notice appear in supporting
  21.  * documentation, and that the name of the University of Washington not be
  22.  * used in advertising or publicity pertaining to distribution of the software
  23.  * without specific, written prior permission.  This software is made
  24.  * available "as is", and
  25.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  26.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  27.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  28.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  29.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  31.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  32.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  33.  *
  34.  */
  35.  
  36. /* Build parameters */
  37.  
  38.  
  39. /* Command bits from tenex_getflags(), must correspond to mailbox bit values */
  40.  
  41. #define fSEEN 1
  42. #define fDELETED 2
  43. #define fFLAGGED 4
  44. #define fANSWERED 8
  45. #define fOLD 16            /* moby sigh */
  46.  
  47.  
  48. /* TENEX I/O stream local data */
  49.  
  50. typedef struct tenex_local {
  51.   unsigned int inbox : 1;    /* if this is an INBOX or not */
  52.   int fd;            /* file descriptor for I/O */
  53.   off_t filesize;        /* file size parsed */
  54.   char *buf;            /* temporary buffer */
  55.   unsigned long buflen;        /* current size of temporary buffer */
  56. } TENEXLOCAL;
  57.  
  58.  
  59. /* Convenient access to local data */
  60.  
  61. #define LOCAL ((TENEXLOCAL *) stream->local)
  62.  
  63. /* Function prototypes */
  64.  
  65. DRIVER *tenex_valid  ();
  66. long tenex_isvalid  ();
  67. void *tenex_parameters  ();
  68. void tenex_find  ();
  69. void tenex_find_bboards  ();
  70. void tenex_find_all  ();
  71. void tenex_find_all_bboards  ();
  72. long tenex_subscribe  ();
  73. long tenex_unsubscribe  ();
  74. long tenex_subscribe_bboard  ();
  75. long tenex_unsubscribe_bboard  ();
  76. long tenex_create  ();
  77. long tenex_delete  ();
  78. long tenex_rename  ();
  79. MAILSTREAM *tenex_open  ();
  80. void tenex_close  ();
  81. void tenex_fetchfast  ();
  82. void tenex_fetchflags  ();
  83. ENVELOPE *tenex_fetchstructure  ();
  84. char *tenex_fetchheader  ();
  85. char *tenex_fetchtext  ();
  86. char *tenex_fetchbody  ();
  87. unsigned long tenex_header  ();
  88. void tenex_setflag  ();
  89. void tenex_clearflag  ();
  90. void tenex_search  ();
  91. long tenex_ping  ();
  92. void tenex_check  ();
  93. void tenex_snarf  ();
  94. void tenex_expunge  ();
  95. long tenex_copy  ();
  96. long tenex_move  ();
  97. long tenex_append  ();
  98. void tenex_gc  ();
  99.  
  100. int tenex_lock  ();
  101. void tenex_unlock  ();
  102. unsigned long tenex_size  ();
  103. char *tenex_file  ();
  104. long tenex_getflags  ();
  105. long tenex_parse  ();
  106. long tenex_copy_messages  ();
  107. MESSAGECACHE *tenex_elt  ();
  108. void tenex_update_status  ();
  109. char tenex_search_all  ();
  110. char tenex_search_answered  ();
  111. char tenex_search_deleted  ();
  112. char tenex_search_flagged  ();
  113. char tenex_search_keyword  ();
  114. char tenex_search_new  ();
  115. char tenex_search_old  ();
  116. char tenex_search_recent  ();
  117. char tenex_search_seen  ();
  118. char tenex_search_unanswered  ();
  119. char tenex_search_undeleted  ();
  120. char tenex_search_unflagged  ();
  121. char tenex_search_unkeyword  ();
  122. char tenex_search_unseen  ();
  123. char tenex_search_before  ();
  124. char tenex_search_on  ();
  125. char tenex_search_since  ();
  126. char tenex_search_body  ();
  127. char tenex_search_subject  ();
  128. char tenex_search_text  ();
  129. char tenex_search_bcc  ();
  130. char tenex_search_cc  ();
  131. char tenex_search_from  ();
  132. char tenex_search_to  ();
  133.  
  134. typedef char (*search_t)  ();
  135. search_t tenex_search_date  ();
  136. search_t tenex_search_flag  ();
  137. search_t tenex_search_string  ();
  138.  
  139. char *bezerk_snarf  ();
  140.